<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>常见网页布局-浮动实现</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        div {
            text-align: center;
        }
        .header {
            height: 100px;
            background-color: lightgray;
        }
        .banner, .small, .big {
            width: 1405px;
            background-color: lightgray;
            margin: 20px auto 0px;
        }
        .footer {
            height: 340px;
            background-color: lightgray;
            margin-top: 20px;
        }
        .banner {
            height: 200px;
        }
        .s-item {
            width: 340px;
            height: 180px;
            margin-right: 15px;
            background-color: lightpink;
            float: left;
        }

        .b-item {
            width: 340px;
            height: 460px;
            background-color: lightskyblue;
            margin-right: 15px;
            float: left;
        }
        .s-item-last, .b-item-last {
            margin-right: 0px;
        }

        .clearfix:before, .clearfix:after {
            content: "";
            display: table;
        }
        .clearfix:after {
            clear: both;
        }
        .clearfix {
            *zoom: 1;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">我是header</div>
        <div class="banner">我是banner</div>
        <div class="small clearfix">
            <div class="s-item"></div>
            <div class="s-item"></div>
            <div class="s-item"></div>
            <div class="s-item s-item-last"></div>
        </div>
        <div class="big clearfix">
            <div class="b-item">我是大的内容1</div>
            <div class="b-item">我是大的内容2</div>
            <div class="b-item">我是大的内容3</div>
            <div class="b-item b-item-last">我是大的内容4</div>
        </div>
        <div class="footer">我是footer</div>
    </div>
    
</body>
</html>